    package edu.nf.identification.common.config;

    import lombok.RequiredArgsConstructor;
    import org.springframework.ai.chat.client.ChatClient;
    import org.springframework.ai.chat.client.advisor.MessageChatMemoryAdvisor;
    import org.springframework.ai.chat.memory.ChatMemory;
    import org.springframework.ai.chat.memory.MessageWindowChatMemory;
    import org.springframework.ai.chat.model.ChatModel;
    import org.springframework.context.annotation.Bean;
    import org.springframework.context.annotation.Configuration;

    @Configuration
    @RequiredArgsConstructor
    public class AiConfig {

        private final ChatModel chatModel;

        /**
         * 装配ChatClient
         * @return
         */
        @Bean
        public ChatClient chatClient(){
            return ChatClient.builder(chatModel)
                    .build();
        }
    }